home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5321 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: thunder.ocis.temple.edu!akim
  2. From: akim@thunder.ocis.temple.edu (Andrew Kim)
  3. Newsgroups: comp.lang.c
  4. Subject: Don't Read This
  5. Date: 10 Feb 1996 01:59:19 GMT
  6. Organization: Temple University, Academic Computer Services
  7. Message-ID: <4fgu5n$75u@cronkite.ocis.temple.edu>
  8. NNTP-Posting-Host: thunder.ocis.temple.edu
  9. NNTP-Posting-User: akim
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Please help.
  13. I thought I could get your attention to help me here.
  14. I am trying to do the following:
  15.  
  16. 1.  Write a main program that will use following functions:
  17.     a)  int get_int ()
  18.     b)  int get_int_in_range ()
  19.     c)  float get_float ()
  20.     d)  float get_float_in_range ()
  21.  
  22. 2.  Above program will used the above listed functions to get necessary 
  23. information to compute miles per gallon your car will be driven.  Int 
  24. will be used for your mileage data and float will be used for gas used.
  25.  
  26. 3.  It is obvious the get_int and get_float will not be used over and 
  27. over again, but get_int_in_range and get_float_in_range will be used more 
  28. than once.  The program is to use negative number as a sentinel value and 
  29. range is used to accept numbers so you will not be buying more gas than 
  30. your car can fill-up with.  Furthermore, your car will not drive 200 
  31. miles per gallon, and your program is to accept a reasonable numbers only.
  32.  
  33. Anyone programing this will receive a kudo from me, yours truly,
  34.  
  35.  
  36. Andrew.
  37.  
  38.  
  39.   
  40.  
  41.